﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FreeAccessNetdisk.src.classes
{
    public enum ChangeType
    {
        CREATE,
        MODIFY,
        DELETE,
    }

    public readonly struct ChangeFileInfo
    {
        public ChangeType ChangeType { get; }
        public string FileDir { get; }

        public ChangeFileInfo(ChangeType changeType, string fileDir)
        {
            ChangeType = changeType;
            FileDir = fileDir;
        }
    }

    public delegate void FileChangeHandler(ChangeFileInfo changeFile);

    public interface IWatcher
    {
        event FileChangeHandler FileChangeEvent;

        void InformFileChange(ChangeType changeType, string fileDir);

        void StartWatcher();

        void StopWatcher();

        void SetTarget(string targetDir);
    }
}
